CKEDITOR.dialog.add('isoline', function(editor) {
	return {
		title: '等值线管理',
		minWidth: 400,
		minHeight: 120,
		contents: [{
			id: 'info',
			label: '配置',
			elements: [{
				id: 'myhtml',
				type: 'html',
				label: 'HTML区域',
				html: '',
				onShow: function() {
					IsoLine.getConfigHtml(this.getElement().$);
				},
				commit: function(widget) {
					widget.setData('r', 'r' + new Date().valueOf());
				}
			}]
		}],
		onOk: function() {
			IsoLine.okSign = true;
			var dialogEle = this.getElement().$;
			var waterType = $('#waterType option:selected', dialogEle).val();
			var waterArea = $('#waterArea option:selected', dialogEle).val();
			var beginTm = $('#waterBeginTm option:selected', dialogEle);
			var endTm = $('#waterEndTm option:selected', dialogEle);
			IsoLine.queryParams = {
				waterType: waterType,
				waterArea: waterArea,
				beginTm: beginTm.val(),
				endTm: endTm.val()
			}
			IsoLine.saveParams = {
				waterType: waterType,
				waterArea: waterArea,
				beginTm: beginTm.text(),
				endTm: endTm.text()
			}
		},
		onCancel: function() {
			IsoLine.saveParams = {};
		},
		onShow: function() {
			$(this.getElement().$).on('mousedown', function() {
				if (IsoLine.currOptionSelect) {
					IsoLine.currOptionSelect.select2('close');
				}
			})
		}
	};
});